package com.ngovanhau.justsort;

import com.ngovanhau.justsort.util.UtilFont;

import android.os.Bundle;
import android.app.Activity;
import android.view.View;
import android.widget.TextView;

public class WinActivity extends Activity {

	TextView line1, line2;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_win);
		
		line1 =(TextView) findViewById(R.id.win_congras);
		line2 = (TextView) findViewById(R.id.win_time);
		line1.setTypeface(UtilFont.getFont());
		line2.setTypeface(UtilFont.getFont());
		
		Bundle bundle = getIntent().getExtras();
		int time = bundle.getInt("time");
		
		line2.setText(time + "s");
		MainMenuActivity.sound.playWin();
	}
	
	public void onClick(View view){
		if(view.getId() == R.id.btn_win){
			MainMenuActivity.sound.playClickButton();
			this.finish();
		}
	}
}
